

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin t&iacute;tulo</title>
<link rel="stylesheet" type="text/css" media="screen" href="css/main.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/tab.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/grid.css" />
</head>
<body>

<p><strong class="subtitle">Busqueda de Sala</strong></p>

<form id="form1" name="form1" method="post" action="ListadoSalaServlet">

<table class="bodyContainer marco"">
  <tr>
    <td></td>
    <td>
    	
  <p>Criterio de busqueda(Por nombre) :
      <label for="textfield"></label>
      <input name="descripcion" type="text" id="textfield" size="80" />
    </p>
    	
    	
	</td>
	<td></td> 
    <td></td>
    <td/>
    <td/>
  </tr>
  <tr>
   
     
    <td><input type="submit" name="button" id="button" value="Buscar"/></td>
  </tr>
</table>
</form>
<table class="bodyContainer marco grid" cellpadding="0" cellspacing="0">
  <tr>


    <th width="192" scope="col" style="width: 156px; ">Nombre</th>
    <th width="107" scope="col" style="width: 123px; ">Direccion</th>
    <th width="192" scope="col" style="width: 107px; ">Local</th>
    <th width="192" scope="col" style="width: 107px; ">Capacidad S/.</th>
    <th width="80" scope="col" style="width: 261px; ">Caracteristicas</th>
    <th width="80" scope="col" style="width: 107px; ">Costo</th>
  </tr>

<%@page import="java.util.*, studio7Omega.modelo.Sala" %>
<% Collection<Sala> salita = (ArrayList<Sala>)request.getAttribute("busca_sala"); %>
<% if(salita != null) { 		%> 
<% 	if( salita.size() == 0 ){ 	%>
		<script> alert( 'No se encontraron registros.' ); </script>
<%	} else {
		int i = 1;
		for(Sala x : salita) {	%>  
		  <tr>
		    <td><div align="center"><% out.print(x.getDescripcion());%></div></td>
		    <td><div align="center"><% out.print(x.getLocal().getDireccion());%></div></td>
		    <td><div align="center"><% out.print(x.getLocal().getDescripcion());%></div></td>
		    <td><div align="center"><% out.print(x.getCapacidad());%></div></td>
		    <td><div align="center"><% out.print(x.getCaracteristicas());%></div></td>
		    <td><div align="center"><% out.print(x.getCosto());%></div></td>
		  </tr>
<%		}
	}  
  } %>
</table>
</body>
</html>

















